<template>
	<view>
		<uni-card v-for="item in message" :title='item.title' :extra="item.startTime">
			<text class="uni-body">{{item.content}}</text>
		</uni-card>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userId:null,
				message:[]
			}
		},
		methods: {
			getMess(){
				let that = this;
				this.$http({
					url:'api/service/message/selectCheMessageByUserId/'+this.userId,
					method:'get',
					success(res){
						if(res.data.code == 200){
							that.message = res.data.data
						}
						console.log(res)
					}
				})
			}
			
		},
		onLoad() {
			this.userId=uni.getStorageSync("user_id"),
			this.getMess()
			
		}
	}
</script>

<style>

	.uni-body{
		color: gray;
		font-size: 12px;
		
	}
</style>
